class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: C = None
        self.t: E = None
        self.r: B = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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