class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.y: F = None
        self.x: F = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.p: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.y: F = None
        self.x: F = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.p: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.o: E = None
        self.txt = txt

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

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