class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: D = None
        self.z: A = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: C = None
        self.x: B = None
        self.v: A = None
        self.p: F = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: D = None
        self.z: A = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: C = None
        self.x: B = None
        self.v: A = None
        self.p: F = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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