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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: A = None
        self.v: B = None
        self.x: G = None
        self.z: H = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.z: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: A = None
        self.v: B = None
        self.x: G = None
        self.z: H = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.z: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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