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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.o: B = None
        self.r: E = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: D = None
        self.v: E = None
        self.q: A = None
        self.y: E = None
        self.p: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: G = None
        self.u: B = None
        self.q: F = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.o: B = None
        self.r: E = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: D = None
        self.v: E = None
        self.q: A = None
        self.y: E = None
        self.p: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: G = None
        self.u: B = None
        self.q: F = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

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

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