class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: I = None
        self.t: G = None
        self.v: I = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: G = None
        self.w: I = None
        self.v: A = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: G = None
        self.w: I = None
        self.v: A = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

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