class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.o: E = None
        self.z: G = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: G = None
        self.o: G = None
        self.y: H = None
        self.r: J = None
        self.x: G = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: H = None
        self.r: H = None
        self.y: C = None
        self.z: C = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.o: E = None
        self.z: G = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: G = None
        self.o: G = None
        self.y: H = None
        self.r: J = None
        self.x: G = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: H = None
        self.r: H = None
        self.y: C = None
        self.z: C = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

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

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

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