class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.y: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: B = None
        self.u: F = None
        self.v: A = None
        self.p: G = None
        self.x: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: H = None
        self.r: A = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: B = None
        self.u: F = None
        self.v: A = None
        self.p: G = None
        self.x: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: H = None
        self.r: A = None
        self.u: B = None
        self.txt = txt

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

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