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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: A = None
        self.u: A = None
        self.x: E = None
        self.txt = txt

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

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

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

l = A("l")
g = B("g")
n = C("n")
m = D("m")
b = E("b")
d = F("d")
e = D("e")
h = E("h")
a = A("a")
j = F("j")

l.s = a
g.p = e
n.y = l
n.p = l
n.u = l
n.x = b
m.v = g
m.t = a
b.y = g
b.u = n
b.w = h
b.x = j
b.s = d
d.w = m
d.s = g
d.o = g
d.p = g
d.t = l
d.x = a
e.v = g
e.t = l
h.y = g
h.u = n
h.w = b
h.x = j
h.s = j
a.s = l
j.w = m
j.s = g
j.o = g
j.p = g
j.t = l
j.x = a
assert n.y.s.s.s.s.s.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: A = None
        self.u: A = None
        self.x: E = None
        self.txt = txt

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

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

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

l = A("l")
g = B("g")
n = C("n")
m = D("m")
b = E("b")
d = F("d")
e = D("e")
h = E("h")
a = A("a")
j = F("j")

l.s = a
g.p = e
n.y = l
n.p = l
n.u = l
n.x = b
m.v = g
m.t = a
b.y = g
b.u = n
b.w = h
b.x = j
b.s = d
d.w = m
d.s = g
d.o = g
d.p = g
d.t = l
d.x = a
e.v = g
e.t = l
h.y = g
h.u = n
h.w = b
h.x = j
h.s = j
a.s = l
j.w = m
j.s = g
j.o = g
j.p = g
j.t = l
j.x = a
assert n.y.s.s.s.s.s.s.s.txt == "a"