class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.w: D = None
        self.p: H = None
        self.o: I = 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.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.y: D = None
        self.t: G = None
        self.r: I = None
        self.u: I = None
        self.s: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: D = None
        self.v: D = None
        self.z: G = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: C = None
        self.u: H = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

g.r = h
g.p = h
g.q = b
g.w = c
g.o = i
l.p = k
a.p = l
c.w = i
c.q = i
c.z = h
c.t = h
c.s = k
c.x = k
c.v = l
b.x = l
b.p = a
b.o = a
b.y = c
b.t = k
b.r = i
b.u = i
b.s = g
f.r = h
f.s = h
f.q = c
f.v = c
f.z = k
k.t = g
k.p = a
k.u = h
k.r = l
k.v = c
h.p = i
i.s = c
assert c.z.p.s.v.p.u.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.w: D = None
        self.p: H = None
        self.o: I = 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.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.y: D = None
        self.t: G = None
        self.r: I = None
        self.u: I = None
        self.s: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: D = None
        self.v: D = None
        self.z: G = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: C = None
        self.u: H = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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