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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: B = None
        self.q: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

j = A("j")
n = B("n")
g = C("g")
d = D("d")
e = E("e")
l = F("l")
a = G("a")
i = F("i")
b = C("b")
k = A("k")

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: B = None
        self.q: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

j = A("j")
n = B("n")
g = C("g")
d = D("d")
e = E("e")
l = F("l")
a = G("a")
i = F("i")
b = C("b")
k = A("k")

j.r = k
j.s = k
j.p = n
j.v = n
j.y = b
n.w = d
n.t = g
g.p = b
g.q = b
g.v = n
g.t = e
d.s = j
d.p = n
d.x = n
e.s = i
l.v = n
l.q = n
l.s = n
l.o = j
l.t = g
a.v = n
a.r = k
i.v = n
i.q = n
i.s = n
i.o = k
i.t = b
b.p = g
b.q = g
b.v = n
b.t = e
k.r = j
k.s = j
k.p = n
k.v = n
k.y = g
assert a.r.r.y.t.s.o.y.v.w.s.txt == "j"