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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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