class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: B = None
        self.t: F = None
        self.o: A = None
        self.y: F = None
        self.v: D = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: E = None
        self.t: F = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: A = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: E = None
        self.s: B = None
        self.v: F = None
        self.z: B = None
        self.p: G = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: D = None
        self.o: D = None
        self.u: H = None
        self.q: C = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: B = None
        self.z: E = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: B = None
        self.s: C = None
        self.v: D = None
        self.z: E = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: A = None
        self.txt = txt

m = A("m")
h = B("h")
i = C("i")
j = D("j")
a = E("a")
c = F("c")
b = G("b")
k = H("k")
d = D("d")
f = A("f")

m.p = k
m.u = h
m.t = c
m.y = c
m.o = f
m.v = j
m.x = a
h.x = a
h.o = a
h.z = a
h.t = c
h.r = j
i.z = h
i.p = m
i.v = k
j.q = k
j.r = a
j.s = h
j.z = h
j.v = c
j.p = b
j.w = f
a.r = h
a.s = d
a.o = d
a.u = k
a.q = i
a.t = i
c.q = k
c.s = h
c.z = a
c.v = j
b.u = h
b.y = h
b.s = i
b.v = j
b.z = a
b.t = d
k.z = h
k.u = f
d.q = k
d.r = a
d.s = h
d.z = h
d.v = c
d.p = b
d.w = m
f.p = k
f.u = h
f.t = c
f.y = c
f.o = m
f.v = j
f.x = a
assert d.w.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: B = None
        self.t: F = None
        self.o: A = None
        self.y: F = None
        self.v: D = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: E = None
        self.t: F = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: A = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: E = None
        self.s: B = None
        self.v: F = None
        self.z: B = None
        self.p: G = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: D = None
        self.o: D = None
        self.u: H = None
        self.q: C = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: B = None
        self.z: E = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: B = None
        self.s: C = None
        self.v: D = None
        self.z: E = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: A = None
        self.txt = txt

m = A("m")
h = B("h")
i = C("i")
j = D("j")
a = E("a")
c = F("c")
b = G("b")
k = H("k")
d = D("d")
f = A("f")

m.p = k
m.u = h
m.t = c
m.y = c
m.o = f
m.v = j
m.x = a
h.x = a
h.o = a
h.z = a
h.t = c
h.r = j
i.z = h
i.p = m
i.v = k
j.q = k
j.r = a
j.s = h
j.z = h
j.v = c
j.p = b
j.w = f
a.r = h
a.s = d
a.o = d
a.u = k
a.q = i
a.t = i
c.q = k
c.s = h
c.z = a
c.v = j
b.u = h
b.y = h
b.s = i
b.v = j
b.z = a
b.t = d
k.z = h
k.u = f
d.q = k
d.r = a
d.s = h
d.z = h
d.v = c
d.p = b
d.w = m
f.p = k
f.u = h
f.t = c
f.y = c
f.o = m
f.v = j
f.x = a
assert d.w.v.v.txt == "c"