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

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

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

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

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

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

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

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

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

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

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

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

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

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

b.t = m
b.u = m
b.w = m
b.q = i
b.y = n
m.r = f
m.o = f
m.u = g
m.t = c
m.y = l
n.q = k
n.o = b
c.q = d
c.t = g
g.y = c
k.v = g
k.x = f
k.s = b
k.z = d
k.q = l
k.y = l
i.q = b
i.t = g
d.t = m
d.u = m
d.w = m
d.q = c
d.y = n
l.v = g
l.x = n
l.s = d
l.z = b
l.q = k
l.y = k
f.q = l
f.o = b
assert n.o.y.q.y.txt == "l"