class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: G = None
        self.s: I = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: C = None
        self.u: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: I = None
        self.q: E = None
        self.v: C = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: G = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: G = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: C = None
        self.u: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: I = None
        self.q: E = None
        self.v: C = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: G = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: G = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

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

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