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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: B = None
        self.s: F = None
        self.p: A = None
        self.o: D = None
        self.v: B = None
        self.u: C = None
        self.x: D = None
        self.txt = txt

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

n = A("n")
g = B("g")
j = C("j")
c = D("c")
a = E("a")
f = F("f")
m = G("m")
h = H("h")
d = E("d")
i = G("i")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: B = None
        self.s: F = None
        self.p: A = None
        self.o: D = None
        self.v: B = None
        self.u: C = None
        self.x: D = None
        self.txt = txt

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

n = A("n")
g = B("g")
j = C("j")
c = D("c")
a = E("a")
f = F("f")
m = G("m")
h = H("h")
d = E("d")
i = G("i")

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