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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: E = None
        self.o: G = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: A = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: E = None
        self.s: I = None
        self.t: G = None
        self.u: E = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: F = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: A = None
        self.o: E = None
        self.q: A = None
        self.p: A = None
        self.t: C = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

n = A("n")
g = B("g")
k = C("k")
c = D("c")
d = E("d")
i = F("i")
h = G("h")
m = H("m")
b = I("b")
a = A("a")

n.v = b
g.v = k
g.q = d
g.s = d
g.o = h
k.o = b
k.w = b
k.u = c
c.w = i
d.r = b
d.s = n
d.q = m
i.x = m
i.p = d
i.u = d
i.s = b
i.t = h
i.y = g
h.o = c
h.s = i
h.v = d
m.s = h
m.w = a
m.p = a
m.o = d
m.q = n
m.t = k
m.u = b
b.t = c
a.v = b
assert g.v.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: E = None
        self.o: G = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: A = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: E = None
        self.s: I = None
        self.t: G = None
        self.u: E = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: F = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: A = None
        self.o: E = None
        self.q: A = None
        self.p: A = None
        self.t: C = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

n = A("n")
g = B("g")
k = C("k")
c = D("c")
d = E("d")
i = F("i")
h = G("h")
m = H("m")
b = I("b")
a = A("a")

n.v = b
g.v = k
g.q = d
g.s = d
g.o = h
k.o = b
k.w = b
k.u = c
c.w = i
d.r = b
d.s = n
d.q = m
i.x = m
i.p = d
i.u = d
i.s = b
i.t = h
i.y = g
h.o = c
h.s = i
h.v = d
m.s = h
m.w = a
m.p = a
m.o = d
m.q = n
m.t = k
m.u = b
b.t = c
a.v = b
assert g.v.o.t.txt == "c"