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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: F = None
        self.u: A = None
        self.t: D = None
        self.r: C = None
        self.s: I = None
        self.x: C = None
        self.z: D = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: G = None
        self.u: G = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: I = None
        self.u: H = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: B = None
        self.w: A = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: A = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: H = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: F = None
        self.u: A = None
        self.t: D = None
        self.r: C = None
        self.s: I = None
        self.x: C = None
        self.z: D = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: G = None
        self.u: G = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: I = None
        self.u: H = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: B = None
        self.w: A = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: A = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: H = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

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

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