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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: D = None
        self.t: E = None
        self.y: D = None
        self.w: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: D = None
        self.t: E = None
        self.y: D = None
        self.w: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.txt = txt

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

b.p = l
c.t = j
j.s = c
j.y = l
j.o = b
d.s = m
d.u = n
d.y = b
d.o = b
d.z = l
d.t = l
l.p = i
l.t = i
l.v = d
l.y = n
l.w = b
l.s = j
m.u = j
m.p = j
i.p = l
i.t = l
i.v = n
i.y = n
i.w = b
i.s = j
n.s = m
n.u = d
n.y = b
n.o = b
n.z = i
n.t = i
g.t = j
assert m.u.y.t.y.t.txt == "i"