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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: F = None
        self.s: A = None
        self.p: F = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: B = None
        self.y: E = None
        self.v: B = None
        self.r: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: F = None
        self.s: A = None
        self.p: F = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: B = None
        self.y: E = None
        self.v: B = None
        self.r: A = None
        self.s: F = None
        self.txt = txt

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

l.s = c
l.y = b
l.v = b
a.y = l
b.s = l
b.w = j
k.x = n
k.o = l
k.r = i
k.w = a
k.v = a
i.o = c
i.u = n
i.p = n
i.s = l
i.t = k
n.z = k
c.t = j
c.u = a
c.v = a
c.y = i
c.r = l
c.s = n
g.x = n
g.o = l
g.r = i
g.w = a
g.v = a
j.s = l
j.w = b
assert j.w.s.y.w.s.txt == "l"