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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: E = None
        self.txt = txt

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

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

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