class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: I = None
        self.y: D = None
        self.r: I = None
        self.q: I = None
        self.o: G = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.w: D = None
        self.x: F = None
        self.s: D = None
        self.y: D = None
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: H = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: A = None
        self.q: E = None
        self.p: G = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.y: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.w: D = None
        self.x: F = None
        self.s: D = None
        self.y: D = None
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: H = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: A = None
        self.q: E = None
        self.p: G = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.y: I = None
        self.txt = txt

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

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

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

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

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