class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: H = None
        self.p: E = None
        self.v: C = None
        self.s: B = None
        self.o: B = None
        self.q: H = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: H = None
        self.w: I = None
        self.p: F = None
        self.s: H = None
        self.q: G = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: E = None
        self.o: A = None
        self.s: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: H = None
        self.q: F = None
        self.s: I = None
        self.p: H = None
        self.v: A = None
        self.y: F = None
        self.z: B = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: H = None
        self.w: I = None
        self.p: F = None
        self.s: H = None
        self.q: G = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: E = None
        self.o: A = None
        self.s: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: H = None
        self.q: F = None
        self.s: I = None
        self.p: H = None
        self.v: A = None
        self.y: F = None
        self.z: B = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: B = None
        self.txt = txt

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

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

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