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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: E = None
        self.txt = txt

e = A("e")
m = B("m")
h = C("h")
g = D("g")
l = E("l")
a = F("a")
b = A("b")
k = F("k")

e.u = g
e.x = h
m.z = l
m.w = g
m.v = h
m.p = h
m.s = e
m.t = k
h.t = g
h.z = k
g.u = b
g.p = b
g.t = l
g.y = k
l.r = h
a.s = e
a.v = l
b.u = g
b.x = h
k.s = e
k.v = l
assert l.r.z.v.r.t.u.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: E = None
        self.txt = txt

e = A("e")
m = B("m")
h = C("h")
g = D("g")
l = E("l")
a = F("a")
b = A("b")
k = F("k")

e.u = g
e.x = h
m.z = l
m.w = g
m.v = h
m.p = h
m.s = e
m.t = k
h.t = g
h.z = k
g.u = b
g.p = b
g.t = l
g.y = k
l.r = h
a.s = e
a.v = l
b.u = g
b.x = h
k.s = e
k.v = l
assert l.r.z.v.r.t.u.u.t.txt == "l"