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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

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

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

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