class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: D = None
        self.x: A = None
        self.u: A = None
        self.v: C = None
        self.p: B = None
        self.r: C = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: F = None
        self.q: F = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: B = None
        self.y: C = None
        self.w: A = None
        self.p: E = None
        self.v: H = None
        self.q: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: C = None
        self.w: D = None
        self.q: H = None
        self.u: E = None
        self.s: E = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.p: C = None
        self.z: B = None
        self.r: C = None
        self.w: A = None
        self.x: B = None
        self.txt = txt

a = A("a")
f = B("f")
i = C("i")
j = D("j")
d = E("d")
e = F("e")
c = G("c")
n = H("n")
h = A("h")
l = E("l")

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: F = None
        self.q: F = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: B = None
        self.y: C = None
        self.w: A = None
        self.p: E = None
        self.v: H = None
        self.q: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: C = None
        self.w: D = None
        self.q: H = None
        self.u: E = None
        self.s: E = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.p: C = None
        self.z: B = None
        self.r: C = None
        self.w: A = None
        self.x: B = None
        self.txt = txt

a = A("a")
f = B("f")
i = C("i")
j = D("j")
d = E("d")
e = F("e")
c = G("c")
n = H("n")
h = A("h")
l = E("l")

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