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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: F = None
        self.r: F = None
        self.x: B = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: F = None
        self.r: F = None
        self.x: B = None
        self.o: F = None
        self.txt = txt

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

b.t = h
b.w = n
a.q = m
l.t = i
l.o = m
l.q = j
i.w = c
i.r = b
i.o = n
i.s = j
i.p = k
i.y = h
h.w = l
h.y = b
j.u = c
j.w = c
j.r = c
j.o = c
j.x = a
c.u = j
c.w = j
c.r = j
c.o = j
c.x = a
m.t = i
m.o = l
m.q = j
k.q = l
n.t = h
n.w = b
assert l.t.p.q.txt == "l"