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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: H = None
        self.u: I = None
        self.v: I = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: C = None
        self.o: F = None
        self.y: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: H = None
        self.u: I = None
        self.v: I = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: C = None
        self.o: F = None
        self.y: F = None
        self.txt = txt

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

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