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

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

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

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

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

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

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

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

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

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

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

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

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

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

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