class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: B = None
        self.u: E = None
        self.q: E = None
        self.v: F = None
        self.w: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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