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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: A = None
        self.o: F = None
        self.t: D = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: A = None
        self.o: F = None
        self.t: D = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

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