class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: E = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: B = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: A = None
        self.q: C = None
        self.p: D = None
        self.z: H = None
        self.w: E = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: B = None
        self.o: D = None
        self.r: C = None
        self.y: I = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: G = None
        self.w: C = None
        self.v: A = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: B = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: A = None
        self.q: C = None
        self.p: D = None
        self.z: H = None
        self.w: E = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: B = None
        self.o: D = None
        self.r: C = None
        self.y: I = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: G = None
        self.w: C = None
        self.v: A = None
        self.y: B = None
        self.txt = txt

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

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