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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: F = None
        self.u: F = None
        self.t: D = None
        self.x: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: F = None
        self.u: F = None
        self.t: D = None
        self.x: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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