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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: E = None
        self.txt = txt

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

a.z = b
a.y = l
a.w = h
l.w = e
b.o = e
j.y = b
j.v = e
j.z = a
j.t = h
e.x = g
m.p = g
m.z = j
m.o = l
m.u = i
g.y = j
g.u = e
i.p = g
i.z = j
i.o = l
i.u = h
h.p = g
h.z = j
h.o = l
h.u = i
assert i.u.u.p.u.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: B = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: E = None
        self.txt = txt

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

a.z = b
a.y = l
a.w = h
l.w = e
b.o = e
j.y = b
j.v = e
j.z = a
j.t = h
e.x = g
m.p = g
m.z = j
m.o = l
m.u = i
g.y = j
g.u = e
i.p = g
i.z = j
i.o = l
i.u = h
h.p = g
h.z = j
h.o = l
h.u = i
assert i.u.u.p.u.x.u.txt == "e"