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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: A = None
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.v: A = None
        self.o: A = None
        self.r: F = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: A = None
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.v: A = None
        self.o: A = None
        self.r: F = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.w: G = None
        self.txt = txt

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

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