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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.v: H = None
        self.q: E = None
        self.r: H = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: H = None
        self.v: D = None
        self.p: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.v: H = None
        self.q: E = None
        self.r: H = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: H = None
        self.v: D = None
        self.p: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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