class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: H = None
        self.v: E = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: I = None
        self.p: H = None
        self.y: C = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: I = None
        self.p: H = None
        self.y: C = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: A = None
        self.txt = txt

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

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