class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.v: F = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.o: E = None
        self.r: A = None
        self.s: D = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.v: F = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.o: E = None
        self.r: A = None
        self.s: D = None
        self.v: B = None
        self.txt = txt

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

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

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

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