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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.y: C = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: C = None
        self.u: F = None
        self.r: I = None
        self.p: I = None
        self.q: H = None
        self.t: I = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.y: C = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: C = None
        self.u: F = None
        self.r: I = None
        self.p: I = None
        self.q: H = None
        self.t: I = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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