class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: A = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: F = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.s: F = None
        self.w: F = None
        self.u: F = None
        self.t: E = None
        self.y: B = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: F = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.s: F = None
        self.w: F = None
        self.u: F = None
        self.t: E = None
        self.y: B = None
        self.x: F = None
        self.txt = txt

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

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