class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: F = None
        self.p: H = None
        self.u: C = None
        self.o: F = None
        self.v: E = None
        self.x: F = None
        self.t: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: A = None
        self.u: D = None
        self.t: F = None
        self.r: H = None
        self.y: H = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: F = None
        self.v: C = None
        self.r: A = None
        self.q: H = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: B = None
        self.q: H = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.v: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: A = None
        self.u: D = None
        self.t: F = None
        self.r: H = None
        self.y: H = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: F = None
        self.v: C = None
        self.r: A = None
        self.q: H = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: B = None
        self.q: H = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.v: B = None
        self.o: C = None
        self.txt = txt

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

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

g.y = k
g.v = k
g.w = b
g.o = b
g.x = b
g.p = h
g.t = h
g.u = i
f.w = h
f.q = g
i.o = g
i.p = g
i.u = d
i.t = b
i.r = h
i.y = h
i.w = l
d.o = m
d.s = b
d.v = i
d.r = g
d.q = h
d.w = h
k.u = i
k.y = f
k.q = h
k.o = m
b.q = f
b.x = g
m.u = l
m.w = i
h.p = m
h.t = b
h.v = f
h.o = i
l.o = g
l.r = d
assert g.v.o.w.u.v.txt == "i"