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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: B = None
        self.w: D = None
        self.q: B = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: B = None
        self.w: D = None
        self.q: B = None
        self.r: A = None
        self.txt = txt

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

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

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