class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.o: H = None
        self.s: A = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.w: I = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: G = None
        self.x: F = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: F = None
        self.x: A = None
        self.q: H = None
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.o: H = None
        self.s: A = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.w: I = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: G = None
        self.x: F = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: F = None
        self.x: A = None
        self.q: H = None
        self.v: E = None
        self.txt = txt

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

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