class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: C = None
        self.y: J = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: H = None
        self.o: A = None
        self.u: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: E = None
        self.x: A = None
        self.t: J = None
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.t: F = None
        self.u: D = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: J = None
        self.w: H = None
        self.s: C = None
        self.p: E = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: G = None
        self.w: C = None
        self.u: F = None
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: H = None
        self.o: A = None
        self.u: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: E = None
        self.x: A = None
        self.t: J = None
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.t: F = None
        self.u: D = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: J = None
        self.w: H = None
        self.s: C = None
        self.p: E = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: G = None
        self.w: C = None
        self.u: F = None
        self.r: C = None
        self.txt = txt

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

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