class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.o: D = None
        self.x: F = None
        self.y: C = None
        self.s: C = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: A = None
        self.x: C = None
        self.y: F = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: C = None
        self.p: F = None
        self.r: C = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: B = None
        self.s: C = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: A = None
        self.x: C = None
        self.y: F = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: C = None
        self.p: F = None
        self.r: C = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: B = None
        self.s: C = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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