class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: G = None
        self.t: B = None
        self.y: F = None
        self.r: D = None
        self.z: B = None
        self.u: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: C = None
        self.p: F = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.q: E = None
        self.o: E = None
        self.u: F = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.p: F = None
        self.x: C = None
        self.q: F = None
        self.r: C = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

f.p = d
f.u = d
f.x = g
f.t = j
f.z = j
f.y = k
f.r = b
j.o = g
j.u = n
j.p = k
j.q = e
l.z = j
b.w = g
b.r = e
b.q = e
b.o = e
b.z = e
b.u = k
b.p = k
e.y = b
e.w = k
e.p = k
e.q = k
e.z = k
e.x = l
e.r = l
k.y = l
k.z = e
g.p = k
d.p = f
d.u = f
d.x = g
d.t = j
d.z = j
d.y = k
d.r = b
n.z = j
assert d.z.u.z.u.z.q.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: G = None
        self.t: B = None
        self.y: F = None
        self.r: D = None
        self.z: B = None
        self.u: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: C = None
        self.p: F = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.q: E = None
        self.o: E = None
        self.u: F = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.p: F = None
        self.x: C = None
        self.q: F = None
        self.r: C = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

f.p = d
f.u = d
f.x = g
f.t = j
f.z = j
f.y = k
f.r = b
j.o = g
j.u = n
j.p = k
j.q = e
l.z = j
b.w = g
b.r = e
b.q = e
b.o = e
b.z = e
b.u = k
b.p = k
e.y = b
e.w = k
e.p = k
e.q = k
e.z = k
e.x = l
e.r = l
k.y = l
k.z = e
g.p = k
d.p = f
d.u = f
d.x = g
d.t = j
d.z = j
d.y = k
d.r = b
n.z = j
assert d.z.u.z.u.z.q.w.y.txt == "l"