class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.t: G = None
        self.o: D = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: F = None
        self.t: A = None
        self.y: A = None
        self.r: I = None
        self.u: F = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.w: B = None
        self.y: D = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: F = None
        self.t: A = None
        self.y: A = None
        self.r: I = None
        self.u: F = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.w: B = None
        self.y: D = None
        self.u: B = None
        self.txt = txt

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

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

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