class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: I = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: C = None
        self.t: J = None
        self.u: G = None
        self.z: A = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: G = None
        self.z: G = None
        self.s: I = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: G = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: J = None
        self.y: J = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.p: H = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: D = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: C = None
        self.t: J = None
        self.u: G = None
        self.z: A = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: G = None
        self.z: G = None
        self.s: I = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: G = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: J = None
        self.y: J = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.p: H = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: D = None
        self.y: E = None
        self.txt = txt

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

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