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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: G = None
        self.o: B = None
        self.s: H = None
        self.u: I = None
        self.w: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.s: C = None
        self.q: H = None
        self.z: I = None
        self.v: F = None
        self.r: E = None
        self.x: G = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.u: A = None
        self.v: G = None
        self.p: B = None
        self.o: H = None
        self.t: B = None
        self.r: E = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: I = None
        self.u: D = None
        self.q: G = None
        self.r: E = None
        self.w: B = None
        self.y: G = None
        self.o: G = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.o: C = None
        self.txt = txt

f = A("f")
c = B("c")
b = C("b")
g = D("g")
d = E("d")
j = F("j")
m = G("m")
l = H("l")
e = I("e")
n = E("n")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: G = None
        self.o: B = None
        self.s: H = None
        self.u: I = None
        self.w: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.s: C = None
        self.q: H = None
        self.z: I = None
        self.v: F = None
        self.r: E = None
        self.x: G = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.u: A = None
        self.v: G = None
        self.p: B = None
        self.o: H = None
        self.t: B = None
        self.r: E = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: I = None
        self.u: D = None
        self.q: G = None
        self.r: E = None
        self.w: B = None
        self.y: G = None
        self.o: G = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.o: C = None
        self.txt = txt

f = A("f")
c = B("c")
b = C("b")
g = D("g")
d = E("d")
j = F("j")
m = G("m")
l = H("l")
e = I("e")
n = E("n")

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