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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: A = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.u: A = None
        self.o: A = None
        self.txt = txt

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

c = A("c")
i = B("i")
j = C("j")
a = D("a")
l = E("l")
m = F("m")
d = A("d")
n = E("n")
h = F("h")

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: A = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.u: A = None
        self.o: A = None
        self.txt = txt

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

c = A("c")
i = B("i")
j = C("j")
a = D("a")
l = E("l")
m = F("m")
d = A("d")
n = E("n")
h = F("h")

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