class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: J = None
        self.o: G = None
        self.z: J = None
        self.p: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: H = None
        self.u: G = None
        self.s: I = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: E = None
        self.x: E = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.r: B = None
        self.v: G = None
        self.x: D = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: B = None
        self.x: A = None
        self.v: D = None
        self.t: C = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: C = None
        self.w: J = None
        self.r: C = None
        self.q: A = None
        self.v: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: D = None
        self.y: F = None
        self.u: B = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: H = None
        self.u: G = None
        self.s: I = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: E = None
        self.x: E = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.r: B = None
        self.v: G = None
        self.x: D = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: B = None
        self.x: A = None
        self.v: D = None
        self.t: C = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: C = None
        self.w: J = None
        self.r: C = None
        self.q: A = None
        self.v: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: D = None
        self.y: F = None
        self.u: B = None
        self.z: E = None
        self.txt = txt

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

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