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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.u: A = None
        self.y: B = None
        self.s: I = None
        self.v: I = None
        self.w: J = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.u: A = None
        self.y: B = None
        self.s: I = None
        self.v: I = None
        self.w: J = None
        self.txt = txt

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

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

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

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