class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: C = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: D = None
        self.t: I = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: C = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: D = None
        self.t: I = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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