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

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: D = None
        self.p: C = None
        self.q: F = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: E = None
        self.w: E = None
        self.y: E = None
        self.txt = txt

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

b.o = j
b.p = j
b.u = l
b.z = l
d.p = m
d.z = a
c.z = j
c.p = j
c.w = a
c.q = n
c.u = i
a.p = e
a.s = i
l.p = a
l.y = a
n.p = i
n.o = l
n.w = l
n.y = l
m.o = j
m.p = j
m.u = l
m.z = l
i.o = c
i.p = j
i.u = l
i.z = l
e.p = i
e.o = l
e.w = l
e.y = l
j.z = c
j.p = c
j.w = a
j.q = e
j.u = m
assert n.p.o.q.p.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: C = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: D = None
        self.p: C = None
        self.q: F = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: E = None
        self.w: E = None
        self.y: E = None
        self.txt = txt

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

b.o = j
b.p = j
b.u = l
b.z = l
d.p = m
d.z = a
c.z = j
c.p = j
c.w = a
c.q = n
c.u = i
a.p = e
a.s = i
l.p = a
l.y = a
n.p = i
n.o = l
n.w = l
n.y = l
m.o = j
m.p = j
m.u = l
m.z = l
i.o = c
i.p = j
i.u = l
i.z = l
e.p = i
e.o = l
e.w = l
e.y = l
j.z = c
j.p = c
j.w = a
j.q = e
j.u = m
assert n.p.o.q.p.z.y.txt == "a"