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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: D = None
        self.q: E = None
        self.p: A = None
        self.t: A = None
        self.r: C = None
        self.txt = txt

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

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

h = A("h")
k = B("k")
b = C("b")
i = D("i")
c = E("c")
a = F("a")
j = D("j")
n = B("n")
f = B("f")
e = F("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: D = None
        self.q: E = None
        self.p: A = None
        self.t: A = None
        self.r: C = None
        self.txt = txt

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

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

h = A("h")
k = B("k")
b = C("b")
i = D("i")
c = E("c")
a = F("a")
j = D("j")
n = B("n")
f = B("f")
e = F("e")

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