class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: E = None
        self.r: A = None
        self.y: E = None
        self.v: D = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.w: D = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.s: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.w: D = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.s: D = None
        self.txt = txt

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

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