class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: B = None
        self.u: I = None
        self.x: G = None
        self.t: D = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: D = None
        self.t: H = None
        self.p: F = None
        self.r: G = None
        self.o: E = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: D = None
        self.u: H = None
        self.y: E = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: C = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: D = None
        self.t: H = None
        self.p: F = None
        self.r: G = None
        self.o: E = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: D = None
        self.u: H = None
        self.y: E = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: C = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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