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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.u: H = None
        self.y: A = None
        self.z: C = None
        self.o: F = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: I = None
        self.u: B = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: B = None
        self.u: C = None
        self.w: E = None
        self.s: E = None
        self.p: I = None
        self.x: E = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: E = None
        self.txt = txt

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

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

h = A("h")
m = B("m")
l = C("l")
b = D("b")
g = E("g")
n = F("n")
c = G("c")
i = H("i")
j = I("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.u: H = None
        self.y: A = None
        self.z: C = None
        self.o: F = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: I = None
        self.u: B = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: B = None
        self.u: C = None
        self.w: E = None
        self.s: E = None
        self.p: I = None
        self.x: E = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: E = None
        self.txt = txt

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

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

h = A("h")
m = B("m")
l = C("l")
b = D("b")
g = E("g")
n = F("n")
c = G("c")
i = H("i")
j = I("j")

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