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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.y: H = None
        self.z: H = None
        self.q: B = None
        self.t: A = None
        self.x: G = None
        self.p: E = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: D = None
        self.q: D = None
        self.t: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: C = None
        self.r: E = None
        self.o: C = None
        self.p: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: F = None
        self.s: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.y: H = None
        self.z: H = None
        self.q: B = None
        self.t: A = None
        self.x: G = None
        self.p: E = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: D = None
        self.q: D = None
        self.t: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: C = None
        self.r: E = None
        self.o: C = None
        self.p: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: F = None
        self.s: D = None
        self.txt = txt

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

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