class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: A = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.r: C = None
        self.y: I = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: A = None
        self.o: H = None
        self.x: C = None
        self.r: F = None
        self.q: D = None
        self.u: I = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: G = None
        self.z: E = None
        self.u: I = None
        self.txt = txt

h = A("h")
k = B("k")
e = C("e")
c = D("c")
g = E("g")
j = F("j")
m = G("m")
n = H("n")
b = I("b")
l = J("l")

h.s = b
h.o = c
k.s = l
k.v = h
k.t = c
k.o = g
e.r = b
c.q = e
c.r = g
g.s = c
g.x = j
g.r = e
g.y = b
g.v = n
j.o = c
m.w = c
m.q = c
m.y = h
m.o = n
m.x = e
m.r = j
m.u = b
m.t = b
n.o = e
b.q = k
l.v = h
l.t = m
l.z = g
l.u = b
assert l.v.s.q.o.s.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: A = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.r: C = None
        self.y: I = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: A = None
        self.o: H = None
        self.x: C = None
        self.r: F = None
        self.q: D = None
        self.u: I = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: G = None
        self.z: E = None
        self.u: I = None
        self.txt = txt

h = A("h")
k = B("k")
e = C("e")
c = D("c")
g = E("g")
j = F("j")
m = G("m")
n = H("n")
b = I("b")
l = J("l")

h.s = b
h.o = c
k.s = l
k.v = h
k.t = c
k.o = g
e.r = b
c.q = e
c.r = g
g.s = c
g.x = j
g.r = e
g.y = b
g.v = n
j.o = c
m.w = c
m.q = c
m.y = h
m.o = n
m.x = e
m.r = j
m.u = b
m.t = b
n.o = e
b.q = k
l.v = h
l.t = m
l.z = g
l.u = b
assert l.v.s.q.o.s.r.s.txt == "c"