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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: D = None
        self.o: H = None
        self.u: I = None
        self.txt = txt

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

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

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

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

i = A("i")
f = B("f")
c = C("c")
h = D("h")
e = E("e")
g = F("g")
n = G("n")
l = H("l")
j = I("j")

i.s = l
i.v = l
i.u = c
i.y = g
i.p = g
i.r = e
f.w = n
f.r = n
f.x = c
f.y = e
f.z = h
f.p = j
f.v = g
c.t = h
h.u = i
h.r = i
e.z = l
e.o = l
e.y = h
e.u = j
g.u = h
n.r = e
n.y = j
l.x = e
j.u = e
j.q = e
j.s = e
j.v = c
j.z = f
j.o = f
j.x = l
assert e.u.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: C = None
        self.v: H = None
        self.y: F = None
        self.p: F = None
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: D = None
        self.o: H = None
        self.u: I = None
        self.txt = txt

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

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

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

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

i = A("i")
f = B("f")
c = C("c")
h = D("h")
e = E("e")
g = F("g")
n = G("n")
l = H("l")
j = I("j")

i.s = l
i.v = l
i.u = c
i.y = g
i.p = g
i.r = e
f.w = n
f.r = n
f.x = c
f.y = e
f.z = h
f.p = j
f.v = g
c.t = h
h.u = i
h.r = i
e.z = l
e.o = l
e.y = h
e.u = j
g.u = h
n.r = e
n.y = j
l.x = e
j.u = e
j.q = e
j.s = e
j.v = c
j.z = f
j.o = f
j.x = l
assert e.u.z.v.txt == "g"