class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: D = None
        self.w: G = None
        self.s: G = None
        self.r: C = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: A = None
        self.q: H = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: D = None
        self.y: H = None
        self.u: G = None
        self.v: H = None
        self.o: A = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.v: D = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: E = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: D = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: A = None
        self.q: H = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: D = None
        self.y: H = None
        self.u: G = None
        self.v: H = None
        self.o: A = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.v: D = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: E = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: D = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

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

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