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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.x: H = None
        self.s: G = None
        self.z: B = None
        self.q: F = None
        self.w: G = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: H = None
        self.q: G = None
        self.z: H = None
        self.r: I = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: H = None
        self.w: H = None
        self.r: C = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: H = None
        self.o: B = None
        self.x: D = None
        self.z: E = None
        self.p: H = None
        self.q: A = None
        self.txt = txt

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

g.r = l
g.y = l
g.u = i
g.x = i
g.p = c
g.s = c
g.q = e
g.z = e
g.o = e
n.t = i
n.v = i
n.o = i
n.r = l
n.x = c
n.s = e
n.w = e
n.z = f
n.q = k
l.y = h
l.w = c
l.s = i
l.u = i
l.z = d
l.q = d
l.o = e
l.r = g
d.y = i
d.u = c
i.y = e
i.q = e
i.v = c
i.z = c
i.r = h
i.u = n
k.x = f
k.z = g
e.z = g
e.x = c
e.w = c
e.r = l
e.y = f
e.p = k
c.v = g
c.q = k
h.v = c
h.s = c
h.p = c
h.o = n
h.x = d
h.z = i
h.q = g
f.t = i
f.v = i
f.o = i
f.r = l
f.x = c
f.s = e
f.w = e
f.z = n
f.q = k
assert l.o.p.z.o.r.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: E = None
        self.y: C = None
        self.p: H = None
        self.x: E = None
        self.q: G = None
        self.z: G = None
        self.o: G = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.x: H = None
        self.s: G = None
        self.z: B = None
        self.q: F = None
        self.w: G = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: H = None
        self.q: G = None
        self.z: H = None
        self.r: I = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: H = None
        self.w: H = None
        self.r: C = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: H = None
        self.o: B = None
        self.x: D = None
        self.z: E = None
        self.p: H = None
        self.q: A = None
        self.txt = txt

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

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