class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: B = None
        self.r: B = None
        self.v: D = None
        self.q: D = None
        self.o: B = None
        self.z: E = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: G = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.x: D = None
        self.o: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: G = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: G = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.x: D = None
        self.o: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: G = None
        self.p: F = None
        self.txt = txt

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

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