class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: E = None
        self.u: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: A = None
        self.o: D = None
        self.q: G = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.q: G = None
        self.s: A = None
        self.x: G = None
        self.r: D = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: A = None
        self.o: D = None
        self.q: G = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.q: G = None
        self.s: A = None
        self.x: G = None
        self.r: D = None
        self.p: F = None
        self.txt = txt

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

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

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

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