class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: F = None
        self.p: C = None
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: F = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: D = None
        self.q: H = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: H = None
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: C = None
        self.t: D = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: E = None
        self.y: E = None
        self.p: C = None
        self.w: C = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: F = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: D = None
        self.q: H = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: H = None
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: C = None
        self.t: D = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: E = None
        self.y: E = None
        self.p: C = None
        self.w: C = None
        self.r: A = None
        self.txt = txt

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

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