class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: I = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.q: G = None
        self.s: A = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: F = None
        self.p: H = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: I = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: F = None
        self.y: B = None
        self.r: B = None
        self.z: C = None
        self.t: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.q: G = None
        self.s: A = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: F = None
        self.p: H = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: I = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: F = None
        self.y: B = None
        self.r: B = None
        self.z: C = None
        self.t: I = None
        self.txt = txt

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

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

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