class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: G = None
        self.s: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

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

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