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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.t: A = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: D = None
        self.w: C = None
        self.z: F = None
        self.q: H = None
        self.x: G = None
        self.r: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.t: E = None
        self.y: B = None
        self.q: F = None
        self.x: D = None
        self.o: D = None
        self.txt = txt

n = A("n")
l = B("l")
e = C("e")
i = D("i")
a = E("a")
d = F("d")
g = G("g")
c = H("c")
m = A("m")
b = H("b")

n.z = i
n.s = l
n.q = l
n.p = m
n.t = e
n.u = a
n.v = b
l.q = i
l.r = a
l.s = c
e.w = m
e.x = m
e.o = l
e.q = l
e.z = l
e.p = a
i.w = d
i.o = d
i.t = m
i.x = g
a.o = i
a.v = i
a.w = e
a.z = d
a.r = d
a.q = b
a.x = g
d.o = a
g.w = i
c.w = d
c.q = d
c.u = a
c.t = a
c.y = l
c.x = i
c.o = i
m.z = i
m.s = l
m.q = l
m.p = n
m.t = e
m.u = a
m.v = c
b.w = d
b.q = d
b.u = a
b.t = a
b.y = l
b.x = i
b.o = i
assert c.q.o.r.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: B = None
        self.p: A = None
        self.t: C = None
        self.u: E = None
        self.q: B = None
        self.v: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.t: A = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: D = None
        self.w: C = None
        self.z: F = None
        self.q: H = None
        self.x: G = None
        self.r: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.t: E = None
        self.y: B = None
        self.q: F = None
        self.x: D = None
        self.o: D = None
        self.txt = txt

n = A("n")
l = B("l")
e = C("e")
i = D("i")
a = E("a")
d = F("d")
g = G("g")
c = H("c")
m = A("m")
b = H("b")

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