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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: D = None
        self.w: A = None
        self.y: A = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: I = None
        self.p: E = None
        self.s: G = None
        self.r: B = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: C = None
        self.q: D = None
        self.o: H = None
        self.s: E = None
        self.t: E = None
        self.v: H = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: D = None
        self.w: A = None
        self.y: A = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: I = None
        self.p: E = None
        self.s: G = None
        self.r: B = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: C = None
        self.q: D = None
        self.o: H = None
        self.s: E = None
        self.t: E = None
        self.v: H = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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