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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: E = None
        self.z: E = None
        self.q: B = None
        self.t: B = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: A = None
        self.o: B = None
        self.p: D = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: E = None
        self.z: E = None
        self.q: B = None
        self.t: B = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: A = None
        self.o: B = None
        self.p: D = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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