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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.t: F = None
        self.q: E = None
        self.p: D = None
        self.r: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: A = None
        self.s: E = None
        self.z: D = None
        self.t: D = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.t: F = None
        self.q: E = None
        self.p: D = None
        self.r: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: A = None
        self.s: E = None
        self.z: D = None
        self.t: D = None
        self.v: A = None
        self.txt = txt

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

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

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