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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: G = None
        self.q: D = None
        self.r: E = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: C = None
        self.r: D = None
        self.v: A = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: G = None
        self.q: D = None
        self.r: E = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: C = None
        self.r: D = None
        self.v: A = None
        self.x: E = None
        self.txt = txt

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

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