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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: F = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: F = None
        self.o: F = None
        self.p: D = None
        self.w: D = None
        self.x: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: F = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: F = None
        self.o: F = None
        self.p: D = None
        self.w: D = None
        self.x: G = None
        self.txt = txt

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

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