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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

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

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

f = A("f")
h = B("h")
i = C("i")
c = D("c")
m = E("m")
j = F("j")
g = E("g")
n = B("n")

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

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

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

f = A("f")
h = B("h")
i = C("i")
c = D("c")
m = E("m")
j = F("j")
g = E("g")
n = B("n")

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