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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: E = None
        self.q: D = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: A = None
        self.r: I = None
        self.o: A = None
        self.t: E = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.v: I = None
        self.p: F = None
        self.y: C = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.p: F = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: E = None
        self.q: D = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: A = None
        self.r: I = None
        self.o: A = None
        self.t: E = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.v: I = None
        self.p: F = None
        self.y: C = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.p: F = None
        self.t: B = None
        self.txt = txt

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

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