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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: F = None
        self.w: J = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: F = None
        self.w: J = None
        self.txt = txt

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

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

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