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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: E = None
        self.v: I = None
        self.t: F = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: H = None
        self.q: I = None
        self.y: F = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: I = None
        self.x: A = None
        self.p: I = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: E = None
        self.v: I = None
        self.t: F = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: H = None
        self.q: I = None
        self.y: F = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: I = None
        self.x: A = None
        self.p: I = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

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

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