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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: A = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.r: F = None
        self.u: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: A = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.r: F = None
        self.u: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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