class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: C = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: E = None
        self.s: C = None
        self.z: B = None
        self.q: G = None
        self.u: E = None
        self.v: C = None
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: B = None
        self.r: E = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: E = None
        self.s: C = None
        self.z: B = None
        self.q: G = None
        self.u: E = None
        self.v: C = None
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: B = None
        self.r: E = None
        self.q: E = None
        self.txt = txt

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

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