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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: G = None
        self.u: D = None
        self.r: F = None
        self.x: A = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: G = None
        self.u: D = None
        self.r: F = None
        self.x: A = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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