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

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

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

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

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

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

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

e.o = d
k.o = e
k.q = f
d.p = b
d.s = b
d.w = b
d.z = b
d.o = f
d.y = c
g.w = k
g.u = b
g.z = b
g.y = j
g.q = d
f.x = i
j.s = f
j.o = f
j.y = f
j.p = k
j.z = c
b.p = d
b.s = d
b.w = d
b.z = d
b.o = f
b.y = c
c.o = b
i.o = e
i.q = f
assert e.o.w.y.o.o.x.q.x.q.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

e.o = d
k.o = e
k.q = f
d.p = b
d.s = b
d.w = b
d.z = b
d.o = f
d.y = c
g.w = k
g.u = b
g.z = b
g.y = j
g.q = d
f.x = i
j.s = f
j.o = f
j.y = f
j.p = k
j.z = c
b.p = d
b.s = d
b.w = d
b.z = d
b.o = f
b.y = c
c.o = b
i.o = e
i.q = f
assert e.o.w.y.o.o.x.q.x.q.txt == "f"