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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: E = None
        self.t: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: E = None
        self.t: A = None
        self.txt = txt

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

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

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