class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: G = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: D = None
        self.y: F = None
        self.z: I = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: B = None
        self.v: I = None
        self.s: H = None
        self.o: F = None
        self.r: C = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: C = None
        self.v: I = None
        self.x: H = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: B = None
        self.s: E = None
        self.p: E = None
        self.o: F = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: E = None
        self.y: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: D = None
        self.y: F = None
        self.z: I = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: B = None
        self.v: I = None
        self.s: H = None
        self.o: F = None
        self.r: C = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: C = None
        self.v: I = None
        self.x: H = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: B = None
        self.s: E = None
        self.p: E = None
        self.o: F = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: E = None
        self.y: D = None
        self.txt = txt

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

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

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