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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: D = None
        self.x: H = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: D = None
        self.x: H = None
        self.v: I = None
        self.txt = txt

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

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

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

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