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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.z: A = None
        self.r: D = None
        self.s: A = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: C = None
        self.u: D = None
        self.q: F = None
        self.z: E = None
        self.p: B = None
        self.txt = txt

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

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

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

m.s = b
m.z = l
m.y = l
m.t = i
m.q = i
n.p = i
n.x = i
n.u = m
n.z = m
n.s = m
n.r = l
c.o = m
j.x = l
j.u = l
j.r = c
j.q = d
j.z = i
j.p = n
i.x = n
i.y = l
b.s = m
b.u = n
b.t = n
b.v = i
b.y = i
b.o = c
d.s = m
d.u = n
d.t = n
d.v = i
d.y = i
d.o = c
l.x = j
l.u = j
l.r = k
l.q = d
l.z = i
l.p = n
k.o = m
assert m.q.y.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: D = None
        self.y: D = None
        self.t: E = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.z: A = None
        self.r: D = None
        self.s: A = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: C = None
        self.u: D = None
        self.q: F = None
        self.z: E = None
        self.p: B = None
        self.txt = txt

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

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

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

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