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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: H = None
        self.z: C = None
        self.x: A = None
        self.y: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: A = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: C = None
        self.t: F = None
        self.o: D = None
        self.x: H = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: E = None
        self.t: F = None
        self.u: F = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.y: D = None
        self.u: D = None
        self.x: D = None
        self.p: D = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: H = None
        self.z: C = None
        self.x: A = None
        self.y: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: A = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: C = None
        self.t: F = None
        self.o: D = None
        self.x: H = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: E = None
        self.t: F = None
        self.u: F = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.y: D = None
        self.u: D = None
        self.x: D = None
        self.p: D = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

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

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