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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.s: G = None
        self.y: I = None
        self.v: F = None
        self.t: G = None
        self.p: I = None
        self.u: C = None
        self.x: G = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: H = None
        self.q: H = None
        self.u: A = None
        self.w: G = None
        self.z: C = None
        self.v: I = None
        self.s: H = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: D = None
        self.u: A = None
        self.o: C = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: F = None
        self.r: G = None
        self.u: C = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.s: G = None
        self.y: I = None
        self.v: F = None
        self.t: G = None
        self.p: I = None
        self.u: C = None
        self.x: G = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: H = None
        self.q: H = None
        self.u: A = None
        self.w: G = None
        self.z: C = None
        self.v: I = None
        self.s: H = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: D = None
        self.u: A = None
        self.o: C = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: F = None
        self.r: G = None
        self.u: C = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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