class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: H = None
        self.v: G = None
        self.y: I = None
        self.w: E = None
        self.s: H = None
        self.p: G = None
        self.r: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: F = None
        self.w: B = None
        self.y: G = None
        self.x: B = None
        self.s: C = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: D = None
        self.x: G = None
        self.w: A = None
        self.s: D = None
        self.u: B = None
        self.o: G = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: I = None
        self.q: E = None
        self.v: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: F = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: F = None
        self.w: B = None
        self.y: G = None
        self.x: B = None
        self.s: C = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: D = None
        self.x: G = None
        self.w: A = None
        self.s: D = None
        self.u: B = None
        self.o: G = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: I = None
        self.q: E = None
        self.v: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: F = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

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