class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: A = None
        self.u: E = None
        self.q: F = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.t: H = None
        self.s: B = None
        self.x: H = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: B = None
        self.s: F = None
        self.v: E = None
        self.q: D = None
        self.p: C = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: A = None
        self.u: E = None
        self.q: F = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.t: H = None
        self.s: B = None
        self.x: H = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: B = None
        self.s: F = None
        self.v: E = None
        self.q: D = None
        self.p: C = None
        self.x: C = None
        self.txt = txt

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

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

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