class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.y: C = None
        self.r: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: C = None
        self.p: H = None
        self.r: F = None
        self.s: A = None
        self.o: A = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: B = None
        self.w: F = None
        self.txt = txt

b = A("b")
f = B("f")
a = C("a")
l = D("l")
c = E("c")
e = F("e")
k = G("k")
g = H("g")
n = B("n")

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: C = None
        self.p: H = None
        self.r: F = None
        self.s: A = None
        self.o: A = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: B = None
        self.w: F = None
        self.txt = txt

b = A("b")
f = B("f")
a = C("a")
l = D("l")
c = E("c")
e = F("e")
k = G("k")
g = H("g")
n = B("n")

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