class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: E = None
        self.w: A = None
        self.s: B = None
        self.v: A = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

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

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

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

l.q = a
e.r = g
c.q = h
c.s = a
c.t = m
c.z = f
c.v = f
c.x = f
a.q = e
a.o = h
a.v = h
a.x = h
a.w = f
i.o = f
i.z = f
i.x = j
i.y = j
i.w = l
i.v = l
i.s = e
f.p = c
f.o = c
f.v = h
f.z = i
f.r = i
f.w = m
f.t = e
h.x = m
h.q = a
h.o = i
h.p = l
j.o = f
j.z = f
j.x = i
j.y = i
j.w = l
j.v = l
j.s = e
g.x = c
g.q = a
g.o = i
g.p = l
m.q = h
m.s = a
m.t = c
m.z = f
m.v = f
m.x = f
assert e.r.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: E = None
        self.w: A = None
        self.s: B = None
        self.v: A = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

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

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

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

l.q = a
e.r = g
c.q = h
c.s = a
c.t = m
c.z = f
c.v = f
c.x = f
a.q = e
a.o = h
a.v = h
a.x = h
a.w = f
i.o = f
i.z = f
i.x = j
i.y = j
i.w = l
i.v = l
i.s = e
f.p = c
f.o = c
f.v = h
f.z = i
f.r = i
f.w = m
f.t = e
h.x = m
h.q = a
h.o = i
h.p = l
j.o = f
j.z = f
j.x = i
j.y = i
j.w = l
j.v = l
j.s = e
g.x = c
g.q = a
g.o = i
g.p = l
m.q = h
m.s = a
m.t = c
m.z = f
m.v = f
m.x = f
assert e.r.q.v.txt == "h"