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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.v: E = None
        self.o: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.v: E = None
        self.o: B = None
        self.txt = txt

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

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