class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.p: E = None
        self.r: D = None
        self.o: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: E = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: C = None
        self.p: B = None
        self.q: G = None
        self.r: C = None
        self.u: F = None
        self.txt = txt

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

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

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

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

d.v = e
d.o = e
d.u = b
d.p = a
d.r = f
e.y = l
c.x = d
c.o = a
c.p = e
c.y = e
c.z = f
c.t = m
f.u = l
f.w = a
f.s = c
f.r = g
a.t = b
a.u = b
a.s = c
a.r = c
a.p = e
a.q = m
b.p = l
b.x = e
b.z = e
b.o = d
m.p = e
g.v = b
g.r = a
g.w = d
l.p = e
assert a.p.y.p.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.p: E = None
        self.r: D = None
        self.o: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: E = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: C = None
        self.p: B = None
        self.q: G = None
        self.r: C = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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