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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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