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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: D = None
        self.r: B = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: D = None
        self.r: B = None
        self.s: A = None
        self.txt = txt

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

g.s = i
g.o = i
g.t = i
g.p = h
g.v = h
g.x = b
h.y = e
h.q = e
f.w = i
f.s = i
f.o = g
f.t = d
f.z = a
e.t = n
e.p = d
i.y = d
i.w = e
d.q = i
d.t = e
d.r = h
d.s = n
a.w = i
a.s = i
a.o = g
a.t = d
a.z = f
l.y = e
l.q = e
n.s = i
n.o = i
n.t = i
n.p = l
n.x = d
n.v = h
b.q = i
b.t = e
b.r = l
b.s = g
assert d.q.y.t.t.v.q.p.txt == "d"