class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: C = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: F = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: C = None
        self.v: C = None
        self.txt = txt

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

g = A("g")
d = B("d")
b = C("b")
k = D("k")
n = E("n")
f = F("f")
l = B("l")
c = A("c")
h = E("h")
e = B("e")

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: F = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: C = None
        self.v: C = None
        self.txt = txt

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

g = A("g")
d = B("d")
b = C("b")
k = D("k")
n = E("n")
f = F("f")
l = B("l")
c = A("c")
h = E("h")
e = B("e")

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