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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: C = None
        self.u: F = None
        self.v: A = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.t: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: F = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: I = None
        self.y: D = None
        self.u: A = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: C = None
        self.q: B = None
        self.p: I = None
        self.y: H = None
        self.r: C = None
        self.u: B = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

m.v = l
m.t = l
m.p = j
m.q = e
m.r = d
k.r = j
k.s = d
k.u = b
k.v = m
k.y = c
d.p = m
d.y = m
d.u = m
d.t = e
c.v = l
c.r = b
c.z = m
j.s = b
j.o = g
j.v = g
j.y = c
j.u = m
b.v = d
b.z = d
b.r = d
b.q = k
b.u = k
b.p = g
b.y = e
b.o = j
l.t = c
l.s = e
e.q = c
g.r = k
assert j.u.p.y.v.t.z.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: G = None
        self.p: E = None
        self.q: H = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: C = None
        self.u: F = None
        self.v: A = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.t: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: F = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: I = None
        self.y: D = None
        self.u: A = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: C = None
        self.q: B = None
        self.p: I = None
        self.y: H = None
        self.r: C = None
        self.u: B = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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