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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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

j.z = c
j.p = c
j.u = g
h.y = c
h.v = c
h.s = g
h.p = g
h.w = l
h.r = d
b.s = f
b.x = h
b.p = g
g.w = c
e.v = h
e.p = i
e.t = c
c.u = i
c.v = i
c.z = l
i.v = l
i.p = e
i.t = c
f.z = c
f.p = c
f.u = g
d.s = f
d.x = l
d.p = g
l.y = c
l.v = c
l.s = g
l.p = g
l.w = h
l.r = b
assert i.t.u.t.u.t.z.w.txt == "h"