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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: H = None
        self.w: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: H = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: E = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: H = None
        self.w: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: H = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: E = None
        self.t: A = None
        self.txt = txt

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

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