class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: G = None
        self.w: C = None
        self.x: H = None
        self.p: D = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: F = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: H = None
        self.t: B = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: G = None
        self.w: H = None
        self.s: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: G = None
        self.t: A = None
        self.s: E = None
        self.x: B = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: D = None
        self.w: G = None
        self.t: A = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: F = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: H = None
        self.t: B = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: G = None
        self.w: H = None
        self.s: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: G = None
        self.t: A = None
        self.s: E = None
        self.x: B = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: D = None
        self.w: G = None
        self.t: A = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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