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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: C = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.x: F = None
        self.r: D = None
        self.q: C = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: C = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.x: F = None
        self.r: D = None
        self.q: C = None
        self.u: C = None
        self.txt = txt

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

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