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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.t: A = None
        self.x: F = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: C = None
        self.v: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.t: A = None
        self.x: F = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: C = None
        self.v: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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