class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: I = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: H = None
        self.w: F = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: H = None
        self.w: F = None
        self.u: C = None
        self.txt = txt

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

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