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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: E = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: E = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

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

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

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