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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.s: G = None
        self.v: C = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: D = None
        self.v: B = None
        self.u: H = 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.v: D = None
        self.z: C = None
        self.x: J = None
        self.w: I = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: B = None
        self.z: C = None
        self.u: B = None
        self.s: J = None
        self.x: H = None
        self.t: A = None
        self.y: C = None
        self.v: I = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: F = None
        self.z: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.s: G = None
        self.v: C = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: D = None
        self.v: B = None
        self.u: H = 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.v: D = None
        self.z: C = None
        self.x: J = None
        self.w: I = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: B = None
        self.z: C = None
        self.u: B = None
        self.s: J = None
        self.x: H = None
        self.t: A = None
        self.y: C = None
        self.v: I = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: F = None
        self.z: F = None
        self.txt = txt

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

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

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