class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.y: I = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: J = None
        self.v: H = None
        self.q: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.p: A = None
        self.y: D = None
        self.r: C = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: J = None
        self.v: H = None
        self.q: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.p: A = None
        self.y: D = None
        self.r: C = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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