class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: A = None
        self.p: H = None
        self.w: E = None
        self.r: H = None
        self.v: B = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.q: G = None
        self.y: A = None
        self.z: H = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: E = None
        self.o: A = None
        self.z: C = None
        self.txt = txt

e = A("e")
f = B("f")
a = C("a")
b = D("b")
j = E("j")
i = F("i")
d = G("d")
m = H("m")
l = G("l")

e.y = l
f.p = e
f.u = d
f.y = a
a.y = j
a.z = b
a.o = i
a.v = m
b.w = d
b.o = i
b.s = j
j.x = f
i.o = e
i.q = e
i.p = m
i.r = m
i.w = j
i.v = f
i.x = d
d.s = f
d.x = j
d.p = j
d.q = l
d.y = e
d.z = m
m.x = b
m.p = j
m.o = e
m.z = a
l.s = f
l.x = j
l.p = j
l.q = d
l.y = e
l.z = m
assert l.z.o.y.x.x.p.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: A = None
        self.p: H = None
        self.w: E = None
        self.r: H = None
        self.v: B = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.q: G = None
        self.y: A = None
        self.z: H = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: E = None
        self.o: A = None
        self.z: C = None
        self.txt = txt

e = A("e")
f = B("f")
a = C("a")
b = D("b")
j = E("j")
i = F("i")
d = G("d")
m = H("m")
l = G("l")

e.y = l
f.p = e
f.u = d
f.y = a
a.y = j
a.z = b
a.o = i
a.v = m
b.w = d
b.o = i
b.s = j
j.x = f
i.o = e
i.q = e
i.p = m
i.r = m
i.w = j
i.v = f
i.x = d
d.s = f
d.x = j
d.p = j
d.q = l
d.y = e
d.z = m
m.x = b
m.p = j
m.o = e
m.z = a
l.s = f
l.x = j
l.p = j
l.q = d
l.y = e
l.z = m
assert l.z.o.y.x.x.p.y.txt == "l"