class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: B = None
        self.w: B = None
        self.t: F = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: B = None
        self.q: C = None
        self.p: H = None
        self.v: A = None
        self.t: J = None
        self.s: I = None
        self.w: A = None
        self.z: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: F = None
        self.u: A = None
        self.z: A = None
        self.s: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: E = None
        self.r: D = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: B = None
        self.w: B = None
        self.t: F = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: B = None
        self.q: C = None
        self.p: H = None
        self.v: A = None
        self.t: J = None
        self.s: I = None
        self.w: A = None
        self.z: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: F = None
        self.u: A = None
        self.z: A = None
        self.s: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: E = None
        self.r: D = None
        self.w: D = None
        self.txt = txt

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

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