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

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

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

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: B = None
        self.y: C = None
        self.u: F = None
        self.z: B = None
        self.r: J = None
        self.s: I = None
        self.w: E = None
        self.v: B = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.w: F = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: I = None
        self.r: E = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: B = None
        self.y: C = None
        self.u: F = None
        self.z: B = None
        self.r: J = None
        self.s: I = None
        self.w: E = None
        self.v: B = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.w: F = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: I = None
        self.r: E = None
        self.o: I = None
        self.txt = txt

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

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