class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: B = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: A = None
        self.w: C = None
        self.s: F = None
        self.r: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.o: B = None
        self.t: G = None
        self.v: D = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.txt = txt

k = A("k")
g = B("g")
n = C("n")
c = D("c")
l = E("l")
m = F("m")
h = G("h")
d = B("d")
e = C("e")
a = D("a")

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: A = None
        self.w: C = None
        self.s: F = None
        self.r: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.o: B = None
        self.t: G = None
        self.v: D = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.txt = txt

k = A("k")
g = B("g")
n = C("n")
c = D("c")
l = E("l")
m = F("m")
h = G("h")
d = B("d")
e = C("e")
a = D("a")

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