class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.o: B = None
        self.t: H = None
        self.u: C = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: I = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: I = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: C = None
        self.txt = txt

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

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

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