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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: C = None
        self.u: E = None
        self.z: D = None
        self.q: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: G = None
        self.y: B = None
        self.s: I = None
        self.q: G = None
        self.u: F = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: F = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: E = None
        self.p: G = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: C = None
        self.u: E = None
        self.z: D = None
        self.q: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: G = None
        self.y: B = None
        self.s: I = None
        self.q: G = None
        self.u: F = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: F = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: E = None
        self.p: G = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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