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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.r: C = None
        self.t: D = None
        self.v: C = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.r: C = None
        self.t: D = None
        self.v: C = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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