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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: B = None
        self.w: C = None
        self.p: F = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: F = None
        self.u: A = None
        self.r: A = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.p: A = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

j = A("j")
i = B("i")
m = C("m")
e = D("e")
l = E("l")
b = F("b")
d = C("d")
k = D("k")

j.o = b
j.q = b
i.x = k
i.q = k
i.s = j
m.q = j
m.v = i
m.w = d
m.p = b
m.o = b
e.w = l
e.t = b
e.x = b
e.u = j
e.r = j
l.x = j
l.s = j
l.p = j
l.t = j
l.y = k
b.r = d
b.q = j
d.q = j
d.v = i
d.w = m
d.p = b
d.o = b
k.w = l
k.t = b
k.x = b
k.u = j
k.r = j
assert d.q.o.q.o.q.q.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: B = None
        self.w: C = None
        self.p: F = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: F = None
        self.u: A = None
        self.r: A = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.p: A = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

j = A("j")
i = B("i")
m = C("m")
e = D("e")
l = E("l")
b = F("b")
d = C("d")
k = D("k")

j.o = b
j.q = b
i.x = k
i.q = k
i.s = j
m.q = j
m.v = i
m.w = d
m.p = b
m.o = b
e.w = l
e.t = b
e.x = b
e.u = j
e.r = j
l.x = j
l.s = j
l.p = j
l.t = j
l.y = k
b.r = d
b.q = j
d.q = j
d.v = i
d.w = m
d.p = b
d.o = b
k.w = l
k.t = b
k.x = b
k.u = j
k.r = j
assert d.q.o.q.o.q.q.q.o.txt == "b"