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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.w: C = None
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.w: C = None
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

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