class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: H = None
        self.v: D = None
        self.x: H = None
        self.z: I = None
        self.u: F = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: A = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: D = None
        self.w: F = None
        self.y: A = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: B = None
        self.t: H = None
        self.o: A = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: B = None
        self.x: D = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: F = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: A = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: D = None
        self.w: F = None
        self.y: A = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: B = None
        self.t: H = None
        self.o: A = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: B = None
        self.x: D = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: F = None
        self.u: A = None
        self.txt = txt

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

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