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

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

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: A = None
        self.v: C = None
        self.o: F = None
        self.txt = txt

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

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

a.y = i
a.r = f
k.o = i
k.y = i
k.u = c
k.x = l
i.y = l
d.p = b
d.z = c
d.u = l
l.u = i
l.v = i
l.t = a
l.o = c
c.p = e
c.t = l
c.w = l
c.v = k
f.p = b
f.z = c
f.u = l
g.p = b
g.z = c
g.u = l
e.p = d
e.z = c
e.u = l
b.p = e
b.z = c
b.u = l
assert g.p.u.o.t.t.y.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: A = None
        self.v: C = None
        self.o: F = None
        self.txt = txt

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

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

a.y = i
a.r = f
k.o = i
k.y = i
k.u = c
k.x = l
i.y = l
d.p = b
d.z = c
d.u = l
l.u = i
l.v = i
l.t = a
l.o = c
c.p = e
c.t = l
c.w = l
c.v = k
f.p = b
f.z = c
f.u = l
g.p = b
g.z = c
g.u = l
e.p = d
e.z = c
e.u = l
b.p = e
b.z = c
b.u = l
assert g.p.u.o.t.t.y.y.o.txt == "c"