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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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