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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: A = None
        self.r: A = None
        self.s: D = None
        self.txt = txt

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

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

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

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

f.y = g
f.t = g
f.s = b
f.q = n
a.t = c
a.y = b
a.v = k
a.w = g
a.q = f
d.z = g
d.u = f
d.r = f
d.s = n
c.w = f
c.q = f
c.u = b
c.v = b
c.t = n
c.y = g
b.u = f
b.q = g
g.q = k
g.t = d
k.t = n
k.y = b
k.v = a
k.w = g
k.q = f
n.w = f
n.q = f
n.u = b
n.v = b
n.t = c
n.y = g
assert a.t.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: F = None
        self.s: E = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: A = None
        self.r: A = None
        self.s: D = None
        self.txt = txt

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

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

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

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

f.y = g
f.t = g
f.s = b
f.q = n
a.t = c
a.y = b
a.v = k
a.w = g
a.q = f
d.z = g
d.u = f
d.r = f
d.s = n
c.w = f
c.q = f
c.u = b
c.v = b
c.t = n
c.y = g
b.u = f
b.q = g
g.q = k
g.t = d
k.t = n
k.y = b
k.v = a
k.w = g
k.q = f
n.w = f
n.q = f
n.u = b
n.v = b
n.t = c
n.y = g
assert a.t.t.t.txt == "c"