class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: I = None
        self.u: J = None
        self.r: A = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: I = None
        self.o: E = None
        self.p: J = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: G = None
        self.s: I = None
        self.w: I = None
        self.v: I = None
        self.u: J = None
        self.q: J = None
        self.t: F = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.r: J = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: I = None
        self.u: J = None
        self.r: A = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: I = None
        self.o: E = None
        self.p: J = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: G = None
        self.s: I = None
        self.w: I = None
        self.v: I = None
        self.u: J = None
        self.q: J = None
        self.t: F = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.r: J = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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