class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: B = None
        self.y: I = None
        self.o: G = None
        self.z: C = None
        self.w: D = None
        self.t: F = None
        self.q: H = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: I = None
        self.q: A = None
        self.x: I = None
        self.t: I = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: A = None
        self.t: C = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.x: G = None
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: I = None
        self.q: A = None
        self.x: I = None
        self.t: I = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: A = None
        self.t: C = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.x: G = None
        self.r: E = None
        self.txt = txt

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

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