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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: B = None
        self.p: A = None
        self.o: F = None
        self.u: D = None
        self.q: D = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: F = None
        self.s: A = None
        self.v: F = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: B = None
        self.o: C = None
        self.p: A = None
        self.r: C = None
        self.q: C = None
        self.x: B = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: B = None
        self.p: A = None
        self.o: F = None
        self.u: D = None
        self.q: D = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: F = None
        self.s: A = None
        self.v: F = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: B = None
        self.o: C = None
        self.p: A = None
        self.r: C = None
        self.q: C = None
        self.x: B = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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