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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: B = None
        self.r: D = None
        self.o: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: D = None
        self.txt = txt

k = A("k")
e = B("e")
m = C("m")
i = D("i")
c = E("c")
h = F("h")
a = G("a")
g = H("g")
j = B("j")

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: B = None
        self.r: D = None
        self.o: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: D = None
        self.txt = txt

k = A("k")
e = B("e")
m = C("m")
i = D("i")
c = E("c")
h = F("h")
a = G("a")
g = H("g")
j = B("j")

k.o = m
k.r = m
k.s = m
k.v = i
k.z = i
k.u = i
k.p = a
e.q = g
e.s = h
e.t = c
m.s = c
m.y = a
i.w = j
c.w = a
c.p = m
c.r = m
c.z = e
h.z = k
h.y = e
h.r = i
h.o = i
a.y = j
g.q = j
g.s = i
j.q = g
j.s = h
j.t = c
assert k.r.s.p.s.r.s.w.y.txt == "j"