class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: C = None
        self.q: C = None
        self.u: C = None
        self.r: G = None
        self.s: F = None
        self.v: H = None
        self.z: G = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: A = None
        self.o: A = None
        self.x: C = None
        self.q: I = None
        self.s: D = None
        self.z: C = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: F = None
        self.z: J = None
        self.o: H = None
        self.w: J = None
        self.y: A = None
        self.p: D = None
        self.u: J = None
        self.s: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: H = None
        self.x: C = None
        self.s: C = None
        self.r: E = None
        self.u: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: A = None
        self.o: A = None
        self.x: C = None
        self.q: I = None
        self.s: D = None
        self.z: C = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: F = None
        self.z: J = None
        self.o: H = None
        self.w: J = None
        self.y: A = None
        self.p: D = None
        self.u: J = None
        self.s: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: H = None
        self.x: C = None
        self.s: C = None
        self.r: E = None
        self.u: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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